<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>快速创建地球</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
		<link rel="stylesheet" href="../../../build/Cesium/Widgets/widgets.css" type="text/css" />
		<link rel="stylesheet" href="../../../build/CEarth/CEarth.css" type="text/css" />
		<link rel="stylesheet" href="../assets/plugins/layui/css/layui.css" type="text/css" />
		<style>
			.infoview{
				position: absolute;
				top: 10px;
				left: 10px;
				padding: 10px 15px;
				border-radius: 4px;
				border: 1px solid rgba(128, 128, 128, 0.5);
				color: #ffffff;
				background: rgba(0, 0, 0, 0.4);
				box-shadow: 0 3px 14px rgb(128 128 128 / 50%);
				z-index: 999;
			}
		</style>
	</head>
	<body>
		<div class="layui-layout layui-layout-admin">
		  <div class="layui-body" id="CEarthContainer" style="top: 0rem;left: 0rem;padding-bottom:0rem">
		  </div>			
		</div>
		
		
 	  <div class="infoview">
			<table class="layui-form">
				<tr>
					<td>开启白昼</td>
					<td style="padding-left: 0.5rem;"><input type="checkbox" name="close" lay-skin="switch"  lay-filter="switchAddAndRemove" lay-text="开启|关闭"></td>
				</tr>
				<tr>
					<td> <input type="checkbox" name="close" lay-skin="switch" lay-filter="switchShowOrHide" lay-text="显示|隐藏"></td>
				</tr>	
				<tr>
					<td><button type="button" class="layui-btn layui-btn-radius layui-btn-xs" id="locationBtn">定位</button></td>
				</tr>							
			</table>
		</div>	
		
		<script src="../../../build/Cesium/Cesium.js"></script>
		<script src="../../../build/CEarth/CEarth.js"></script>
		<script src="../assets/plugins/layui/layui.js" charset="utf-8"></script>

		<script>
			layui.use(['form', 'layedit', 'laydate'], function(){
			   var $ = layui.jquery
			  ,form = layui.form
			  ,layer = layui.layer
			  ,layedit = layui.layedit
			  ,laydate = layui.laydate;
			  var app = new CEarth.App('CEarthContainer');
			  
			  app.create({
				  type:'Map',
				  style:{
					night:false,//是否开启白天黑夜 默认关闭
					fog:true,//是否开启雾效
					density:0,//雾的浓度 默认0
					minimumBrightness:0,//由照明产生的雾色的最小亮度。值0.0可以导致雾完全变黑。1.0的值不会影响亮度。
				  },
				  terrain:{
					 type:'ion' 
				  },
				  atmosphere:true,//是否开启大气效果，默认为 true
				  complete:function(e){
				  }
			  });
			  
			  // 新建一个瓦片图层
			  var imgTileLayer = app.create({
					type: 'TileLayer',
					layer:{
						name: '天地图影像(EPSG:3857)',
						type:'tdt',
						layer:'img_d',
						key:'9ae78c51a0a28f06444d541148496e36',
						show: true,
					},
					complete:function(e){
					}
			  });	
			  
			  var vecTileLayer = app.addLayer({
					type: 'TileLayer',
					layer:{
						name: '天地注记(EPSG:3857)',
						type:'tdt',
						layer:'vec_z',
						key:'9ae78c51a0a28f06444d541148496e36',
						show: true,
					},
					complete:function(e){
					}
			  });
		})
		</script>
	</body>
</html>
